#include "app_hardware.h"
#include "board.h"
#include "fatfs_diskio_register.h"
#include "sdh_sdcard.h"

#define DBG_TAG "APP_HARDWARE"
#include "log.h"

FATFS sd_fs;

int app_hardware_init(void){

    FRESULT ret;

    board_sdh_gpio_init();

    fatfs_sdh_driver_register();

    ret = f_mount(&sd_fs, "/sd", 1);

    LOG_I("SD fileSystem cluster size:%d-sectors (%d-Byte)\r\n", sd_fs.csize, sd_fs.csize * 512);

    return 0;
}


